package com.newsee.remote.shmaterialcontroller;

import com.newsee.remote.common.bean.JsonResult;
import com.newsee.remote.common.dto.budget.BudgetDTO;
import com.newsee.remote.common.dto.material.MaterialDTO;
import com.newsee.remote.common.vo.budget.BudgetVO;
import com.newsee.remote.common.vo.material.MaterialVO;
import com.newsee.remote.ecommerce.service.IShMaterialService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author liangzhi.chen
 * @description 物资分类与物料主数据接收
 * @date 2019/11/11 上午 11:48
 **/
@Slf4j
@RestController
@RequestMapping("/sap/material")
public class ShMaterialController {

    @Autowired
    private IShMaterialService iShMaterialService;

    @ApiOperation(value = "物料主数据增量推送接口")
    @PostMapping
    public JsonResult pushMaterial(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime) {
        return iShMaterialService.pushMaterial(startTime, endTime);
    }

    @ApiOperation(value = "物料表同步科力普的第三方skuid")
    @PostMapping("/syncSkuId")
    public JsonResult syncSkuId() {
        return iShMaterialService.syncSkuId();
    }

}
